package com.henz4help.app.common;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
import com.henz4help.app.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;

public class Util {
	public static void Log(String msg) {
		if(Constants.DEBUG){
			Log.d("Pumpkin",  msg);
		}
			
	}
	
	public static long getNowTimeMillis() {
		long ret = 0L;
		GregorianCalendar calendar = new GregorianCalendar();
		ret = calendar.getTimeInMillis();
		
		return ret;
	}
	
	public static String getCurrentTime(String format) {
		Calendar c = Calendar.getInstance();
		SimpleDateFormat df = new SimpleDateFormat(format);
		return df.format(c.getTime());
	}
	
	public static void showDialogBox(Activity activity, String title, String msg) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setCancelable(false);
		if(title != null) builder.setTitle(title);
		builder.setMessage(msg);
		builder.setPositiveButton(activity.getResources().getString(R.string.ok), null);
		builder.show();
	}
}
